<?php

use Illuminate\Http\Request;


Route::post('/auth/login', 'AuthController@login');
Route::post('/auth/logout', 'AuthController@logout');
Route::post('/auth/register', 'AuthController@register');

Route::group(['middleware' => 'check-user-token'], function () {
    Route::get('/user', 'UserController@index');

    Route::get('/project/{project_id}','ProjectController@get');
    Route::get('/project', 'ProjectController@getAll');
    Route::post('/project','ProjectController@create');
    Route::put('/project','ProjectController@update');
    Route::delete('/project/{project_id}','ProjectController@delete');

    Route::get('/task','TaskController@get');
    Route::post('/task','TaskController@create');
    Route::put('/task','TaskController@update');
    Route::delete('/task','TaskController@delete');
    Route::put('/task/finish/{task_id}', 'TaskController@finishTask');


    Route::get('/board', 'BoardController@get');
    Route::get('/board/{boardId}', 'BoardController@getAll');
    Route::post('/board', 'BoardController@create');
    Route::put('/board/{boardId}', 'BoardController@update');
    Route::delete('/board/{boardId}', 'BoardController@delete');
});
